import {
	getActivityList,
	updateActivity,
	addActivity,
	deleteActivity
} from '@/api'

const state = {}

const mutations = {}

const actions = {
	// 获取权限列表
	async getActivityList({commit}){
		const res = await getActivityList()
		return res
	},
	// 更新权限
	async updateActivity({commit}, body){
		const res = await updateActivity(body)
		return res
	},
	// 添加权限
	async addActivity({commit}, body){
		const res = await addActivity(body)
		return res
	},
	// 删除权限
	async deleteActivity({commit}, body){
		const res = await deleteActivity(body)
		return res
	}
}

export default {
	namespaced: true,
	state,
	mutations,
	actions
}